//公共路径
// const BASE_URL = "http://localhost/ut-manager";
// const BASE_URL = "http://www.17youtui.com/ut-manager";
const BASE_URL = "/api";

//日期格式   JS 时间格式CST转GMT
const getTaskTime = strDate => {
  // console.log("原始时间格式：" + strDate);
  if (null == strDate || "" == strDate) {
    return "";
  }
  var date = new Date(strDate);
  var y = date.getFullYear();
  var m = date.getMonth() + 1;
  m = m < 10 ? "0" + m : m;
  var d = date.getDate();
  d = d < 10 ? "0" + d : d;
  var h = date.getHours();
  var minute = date.getMinutes();
  minute = minute < 10 ? "0" + minute : minute;
  var str = y + "-" + m + "-" + d;
  // console.log(str);
  return str;
};

module.exports = {
  BASE_URL,
  getTaskTime
};
